namespace IMPlant.Core.Web.Control
{
    using System;
    using System.ComponentModel;
    using System.Drawing.Design;

    [TypeConverter(typeof(ExpandableObjectConverter)), ToolboxItem(false)]
    public class SmartSorting
    {
        private bool _allowMultiSorting;
        private bool _allowSortTip;
        private IMPlant.Core.Web.Control.DefaultSorting _defaultSorting;
        private string _sortAscImageUrl;
        private string _sortAscText;
        private string _sortDescImageUrl;
        private string _sortDescText;

        public override string ToString()
        {
            return "";
        }

        [DefaultValue(false), Description("是否启用复合排序"), Category("扩展属性"), NotifyParentProperty(true)]
        public bool AllowMultiSorting
        {
            get
            {
                return this._allowMultiSorting;
            }
            set
            {
                this._allowMultiSorting = value;
            }
        }

        [Category("扩展属性"), DefaultValue(false), NotifyParentProperty(true), Description("是否启用排序提示")]
        public bool AllowSortTip
        {
            get
            {
                return this._allowSortTip;
            }
            set
            {
                this._allowSortTip = value;
            }
        }

        [Description("默认排序的第一次是升序还是降序"), Category("扩展属性"), NotifyParentProperty(true)]
        public IMPlant.Core.Web.Control.DefaultSorting DefaultSorting
        {
            get
            {
                return this._defaultSorting;
            }
            set
            {
                this._defaultSorting = value;
            }
        }

        [Description("升序提示图片的URL"), NotifyParentProperty(true), Category("扩展属性"), Editor("System.Web.UI.Design.UrlEditor", typeof(UITypeEditor))]
        public string SortAscImageUrl
        {
            get
            {
                return this._sortAscImageUrl;
            }
            set
            {
                this._sortAscImageUrl = value;
            }
        }

        [Category("扩展属性"), Description("升序提示文本"), NotifyParentProperty(true)]
        public string SortAscText
        {
            get
            {
                return this._sortAscText;
            }
            set
            {
                this._sortAscText = value;
            }
        }

        [NotifyParentProperty(true), Description("降序提示图片的URL"), Category("扩展属性"), Editor("System.Web.UI.Design.UrlEditor", typeof(UITypeEditor))]
        public string SortDescImageUrl
        {
            get
            {
                return this._sortDescImageUrl;
            }
            set
            {
                this._sortDescImageUrl = value;
            }
        }

        [NotifyParentProperty(true), Description("降序提示文本"), Category("扩展属性")]
        public string SortDescText
        {
            get
            {
                return this._sortDescText;
            }
            set
            {
                this._sortDescText = value;
            }
        }
    }
}

